package com.sx.pojo;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.beans.Transient;
import java.util.Calendar;
import java.util.Date;

@Data
@NoArgsConstructor
@AllArgsConstructor
public class User {
    /**
     * 2021-03-04 15:05:50
     * 用户标识：0普通用户，1管理员，默认数值为0，即普通用户
     */
    private Integer umark;

    public Integer getUmark() {
        return umark;
    }
    public void setUmark(Integer umark) {
        this.umark = umark;
    }

    private String uid;

    private String username;

    private String upassword;

    private String uname;

    private Integer uage;

    private String usex;

    private String uemail;

    private String uphone;

    private Date uregistertime;

    private Byte ustatus;

    private String uvalidatecode;

    @Transient //by
    public Date getLastActivateTime() {
        Calendar cl = Calendar.getInstance();
        cl.setTime(uregistertime);
        cl.add(Calendar.DATE , 2);

        return cl.getTime();
    }
}